[NPU] Reduce test logs#36904
Open
alexandruenache1111 wants to merge 19 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reduces log noise in Intel NPU plugin functional/behavior tests and ensures per-call ov::log::level passed via compile_model/import_model/query_model does not permanently alter the plugin/global logger state.
Changes:
- Scoped per-call log-level handling in the NPU plugin via an RAII guard (
Plugin::LogLevelScope) to restore previous logger levels after API calls. - Lowered default log verbosity in several NPU test suites (e.g., instantiation configs set to
ERR) and adjusted a few tests to avoid flooding compilation logs. - Added/updated a regression test to ensure per-call log level does not contaminate subsequent compiles.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/plugins/intel_npu/tests/functional/internal/compiler_adapter/zero_graph.hpp |
Saves/restores global NPU logger level around test fixture to suppress logs. |
src/plugins/intel_npu/tests/functional/behavior/ov_plugin/core_integration.hpp |
Adds regression test for per-call log-level contamination; uses log callback guards. |
src/plugins/intel_npu/tests/functional/behavior/ov_plugin/core_integration.cpp |
Lowers instantiated test configuration log level to ERR. |
src/plugins/intel_npu/tests/functional/behavior/ov_infer_request/infer_request_run.hpp |
Moves debug log-level enabling to avoid noisy compilation logs; minor formatting. |
src/plugins/intel_npu/tests/functional/behavior/ov_infer_request/infer_request_dynamic.cpp |
Removes a stray leading comment line. |
src/plugins/intel_npu/tests/functional/behavior/compiled_model/property.hpp |
Adds global logger level save/restore in fixture; adds logger guards in tests; lowers some log levels. |
src/plugins/intel_npu/tests/functional/behavior/compiled_model/compatibility_string.hpp |
Adds global logger level save/restore in fixture; formatting of compile calls. |
src/plugins/intel_npu/src/plugin/src/plugin.cpp |
Introduces read_log_level() helper and Plugin::LogLevelScope usage for per-call scoping. |
src/plugins/intel_npu/src/plugin/include/plugin.hpp |
Declares Plugin::LogLevelScope (RAII) and stores previous levels via std::optional. |
This reverts commit dbdb844.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details:
Trying to reduce the printed logs as much as possible.
Exception: the tests from
src/plugins/intel_npu/tests/functional/behavior/dynamic_host_pipeline/infer_with_host_compile.hppcannot be modified since they rely heavily on log asserts. I am unable to suppress compiler warnings while keeping intact the test logic.Added
LogLevelScopeto solve the issue, where while callingcompile_model()twice sequentially, the second call inherits the log level set in the first one. This solution still does not address the thread safety problem.Tickets:
AI Assistance: